//
//  CXAboutViewController.m
//  ProjectOfBStage
//
//  Created by cuixin on 15/11/28.
//  Copyright © 2015年 cuixin. All rights reserved.
//

#import "CXAboutViewController.h"

#define kWidth self.view.frame.size.width
#define kHeight self.view.frame.size.height

#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width

#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#define WIDTH_PRO(X) (X)*(SCREEN_WIDTH/375)

#define HEIGHT_PRO(Y) (Y)*(SCREEN_HEIGHT/667)

@interface CXAboutViewController ()
@property (nonatomic, retain)UIView *backView;
@property (nonatomic, retain)UIScrollView *scorllView;
@property (nonatomic, retain)UIPageControl *pageControl;


@end

@implementation CXAboutViewController
-(void)dealloc{
    [_backView release];
    [_scorllView release];
    [_pageControl release];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.hidden = YES;
 
    [self createNavigationBar];
    [self createlabel];
}


-(void)createNavigationBar{
    self.backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kWidth, HEIGHT_PRO(50))];
    self.backView.backgroundColor = [UIColor blackColor];
    [self.view addSubview:self.backView];
    
    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    backButton.frame = CGRectMake(WIDTH_PRO(10), HEIGHT_PRO(20), WIDTH_PRO(20), HEIGHT_PRO(20));
    [backButton setBackgroundImage:[UIImage imageNamed:@"gobackbtn@2x"] forState:UIControlStateNormal];
    [backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.backView addSubview:backButton];
    
    UILabel *titleLable = [[UILabel alloc] initWithFrame:CGRectMake(kWidth / WIDTH_PRO(2) - KWIDTH * 10, backButton.frame.origin.y, WIDTH_PRO(100), backButton.frame.size.height)];
    titleLable.font = [UIFont systemFontOfSize:HEIGHT_PRO(15)];
    [titleLable setText:@"关于我们"];
    [titleLable setTextColor:[UIColor whiteColor]];
    [self.backView addSubview:titleLable];
    
    
    [titleLable release];
    [self.backView release];
}


-(void)createlabel{
    UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"aboutUs"]];
    image.frame = CGRectMake(0, HEIGHT_PRO(50), kWidth, kHeight - 50);
    [self.view addSubview:image];
    
    
}
#pragma mark 返回按钮
-(void)backButtonAction:(UIButton *)button{
    
    [self.navigationController popViewControllerAnimated:YES];
}

-(void)viewWillAppear:(BOOL)animated{
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
